<?php
/**
 * 配置文件
 * 2010.11.22
 */
ini_set("display_errors", "On");
error_reporting(E_ALL);
$webroot = isset($_SERVER['SERVER_NAME']) ? $_SERVER['SERVER_NAME'] : 'x.wt';
define('D', false);
define('DBHOST', '127.0.0.1');
define('DBUSER', 'root');
define('DBPASSW', 'yunlian');
define('DBNAME', 'feed');
define('DBCHAR', 'utf8');
define('WT_ROOT', substr(dirname(__FILE__), 0, -8));
define('WT_ROOT_2', dirname(__FILE__));
define('METHOD', 'index'); //首页默认方法
define('WEBROOT', 'http://' . $webroot . '/');
define('XML_ROOT', WT_ROOT . 'smartyFile/XML/');
define('XML_OS', substr(PHP_OS, 0, -2)); #软件运行的系统
#导入模板
include WT_ROOT . 'smarty/Smarty.class.php';
#导入session设定
include 'libSession.php';

/*--------------腾讯登录接口---------------------------*/
$_SESSION['appid']		= 206063;
$_SESSION['appkey']		= '9d5c52cd5c27ab9785c93e50bf604c09';
$_SESSION["callback"]	= 'http://x.wt/qq/oauth/get_access_token.php';



/**
 * 初始模板相关参数，
 * @author wangtao
 */
class smasrty extends Smarty
{
	function __construct()
	{
		$this-> template_dir =  XML_ROOT . 'themes';
		$this -> compile_dir = XML_ROOT . 'compile';
		$this -> config_dir = XML_ROOT . 'config';
		$this -> cache_dir = XML_ROOT . 'cache';
		$this->assign('WEBROOT', WEBROOT);
	}
}
/*设置错误提示*/
#set_error_handler('errorpage::e');
